package com.daytask.util;

import java.util.Map;

import com.daytask.common.ControllorCommon;

public class ControllorUtils {
	
	/**
	 * 设置返回结果 map
	 * @param responseMap
	 * @param status
	 */
	public   static   void createJsonResultMap( Map<String, Object> responseM  ,int status ){
		if(status ==1 ){
			responseM.put("status", ControllorCommon.operate_success_status);
			responseM.put("title", ControllorCommon.msg_title_info);
			responseM.put("message", ControllorCommon.operate_success_msg);
			responseM.put("msgLeavl", "info");
		}else if(status==2){
			responseM.put("status", ControllorCommon.operate_haft_status);
			responseM.put("title", ControllorCommon.msg_title_error);
			responseM.put("message", ControllorCommon.operate_haft_msg);
			responseM.put("msgLeavl", "error");
		}else{
			responseM.put("status", ControllorCommon.operate_fail_status);
			responseM.put("title", ControllorCommon.msg_title_error);
			responseM.put("message", ControllorCommon.operate_fail_msg);
			responseM.put("msgLeavl", "error");
		}
	}
	
	/**
	 * 返回用户id
	 * @return
	 */
	public   static String getUserid(){
		return "liquan";
	}
}
